from tkinter import *

root = Tk()

root.title("canvas")
root.geometry("400x400")

canvas = Canvas(root, bg = "green", width = 400, height = 400)
canvas.pack()

canvas.create_line(0, 0, 400, 400, fill = "yellow")
canvas.create_line(0, 400, 400, 0, fill = "blue", dash = (4,4))

root.mainloop()